<!DOCTYPE html>
{% load static %}
<html lang="zh-hans">
<head>
    <meta charset="UTF-8">
    <title>标签管理 - 我的博客</title>
    <link rel="stylesheet" href="{% static 'users/bulma.css' %}">
    <style>
        .tag-cloud {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
        }
        .tag-item {
            transition: transform 0.2s;
        }
        .tag-item:hover {
            transform: scale(1.05);
        }
    </style>
</head>
<body>
    <!-- 导航栏同文章管理页 -->

    <!-- 主内容 -->
    <div class="management-container">
        <div class="box is-shadowless">
            <h2 class="title is-4 mb-5">标签管理</h2>

            <div class="tag-cloud">
                {% for tag in tags %}
                <div class="tag-item">
                    <div class="tags has-addons">
                        <span class="tag is-medium is-info">
                            {{ tag.name }}
                        </span>
                        <a href="{% url 'blog:delete_tag' tag.id %}"
                           class="tag is-medium is-delete is-danger"></a>
                    </div>
                </div>
                {% empty %}
                <p class="has-text-centered">暂无标签</p>
                {% endfor %}
            </div>
        </div>
    </div>

    <!-- 页脚同文章管理页 -->
</body>
</html>